<?php
declare (strict_types = 1);

namespace app\common\model;

use think\Model;
use think\model\concern\SoftDelete;

/**
 * @mixin \think\Model
 */
class Brand extends Model
{
    use SoftDelete;

    /**
     * 建立品牌与分类的关系
     * @return \think\model\relation\HasOne
     */
    public function category(){
        return $this->hasOne(Category::class,'id','cate_id')->bind(['cate_name','image_url']);
    }
}
